//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __ELASTOS_SALLOC_H__
#define __ELASTOS_SALLOC_H__

#define STATICALLOC_DEFAULT_ALIGNMENT       8

EXTERN DECL_CODEINIT bool_t InitStaticAlloc(
        const MemoryRegion freeRegions[], uint_t uNumberOfFreeRegions);

EXTERN DECL_CODEINIT void UninitStaticAlloc(
        MemoryRegion freeRegions[], uint_t uNumberOfFreeRegions);

EXTERN DECL_CODEINIT virtaddr_t StaticAlloc(
        size_t size, size_t uAlignment = STATICALLOC_DEFAULT_ALIGNMENT);

EXTERN DECL_CODEINIT void DumpStaticAlloc(const char *szTitle);

#endif //__ELASTOS_SALLOC_H__
